#ifndef __XKK_CONDITION_H__
#define __XKK_CONDITION_H__

#include "Noncopyable.hpp"
#include <pthread.h>

namespace xkk
{

class MutexLock;
class Condition
    :Noncopyable
{
public:
    Condition(MutexLock &);
    ~Condition();

    void wait();
    void notify();
    void notifyAll();
private:
    pthread_cond_t _cond;
    MutexLock &_mutex;
};

}//end of namespace xkk
#endif
